import 'dart:io';

import 'package:flutter/material.dart';

class Client {
  Socket socket;
  String clientIp = '';
  int clientPort = -1;
  String recvData = '';
  bool showHex = false;
  bool autoLine = false;
  bool sendHex = false;
  bool autoSend = false;
  int period = 1000;
  int rxNum = 0;
  int txNum = 0;

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['clientIp'] = this.clientIp;
    data['clientPort'] = this.clientPort;
    data['recvData'] = this.recvData;
    data['showHex'] = this.showHex;
    data['autoLine'] = this.autoLine;
    data['sendHex'] = this.sendHex;
    data['autoSend'] = this.autoSend;
    data['period'] = this.period;
    data['rxNum'] = this.rxNum;
    data['txNum'] = this.txNum;
    return data;
  }
}
